<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
</head>
<body>
	<input type="button" value="点击按钮修改图片" id="btn">
	<img src="../image/1-small.jpg" alt="" id="img1">


	<script>

		function my$(id){
		// var id = "btn"
		return document.getElementById(id)
	}

	

	// var btnObj = document.getElementById('btn');
	// var imgObj = document.getElementById('img1');

	my$("btn").onclick = function(){
	// imgObj.src = '../image/2-small.jpg'

	my$("img1").src = "../image/1.jpg"
}

</script>
</body>
</html>